-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install state file #998
Install state file #998
Conversation
Fixes the serialization / hydratation
@arcanis as discussed there #990 (comment) I took a more brutal approach. The interesting stuff is in However once again I am stuck. I thought this approach would be straightforward enough for me to manage it, but nope! It seems that restoring |
When dumping the loaded content I see that |
Also of note: the file is 10M for our repository, I can't imagine what it will be for yours 😬 Maybe some basic format packing optimizations would be a good idea (I think ideally it shouldn't be much more than 1MB for our repo, given that the lockfile is 800KB). |
The time in
There isn't at the moment, but I'm fine if you add a private field to
Not needed anymore, let's remove it.
That seems about right. The code is formatted very differently from the rest of the app so I'll likely make a pass to uniformize it, but the logic itself looks fine. |
Ok, finished! I now write/control the checksum of the lockfile + installStateFileVersion before writing/reading the install state file. It adds 1-3ms depending on the project, so nothing much. It looks like this
Let me know what you think @arcanis , change the code style if you like, and let's get this merged! |
Results of the stress test: It's very good! It looks like this: Which is much better than it was before with #990 : (note the different vertical axis): |
f8d8bb0
to
96c8397
Compare
I had a look at the branch, it looks good to me |
96c8397
to
61ca9e4
Compare
It was nice for testing but a bit out of place in the end :-) Co-Authored-By: Kristoffer K. <[email protected]>
🎉🎉🎉 Thanks @crubier! |
Thank you so much @arcanis for supporting me through this! My first contribution to yarn, and a lifesaver for my company's tech team, reducing our install and build times by a lot! Best 🎉 |
gitignore changes copied from yarnpkg/berry#998.
What's the problem this PR addresses?
#973
How did you fix it?
A bit more brutally than in #990
Here we save the whole project state in one big file so there are no resolution to be done at run time.